#pragma once
/***********************************************************************************************
COPYRIGHT 2011 Mafahir Fairoze

This file is part of Neural++.
(Project Website : http://mafahir.wordpress.com/projects/neuralplusplus)

Neural++ is a free software. You can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

Neural++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License <http://www.gnu.org/licenses/> for more details.

***********************************************************************************************/

#include "KohonenLayer.h"
#include "../Connector.h"

namespace NeuralPlusPlus
	{
	namespace Core
		{
		namespace SOM

			{
			/// <summary>
			/// A Kohonen Connector is an <see cref="IConnector"/> consisting of a collection of Kohonen
			/// synapses connecting any layer to a Kohonen Layer.
			/// </summary>
			class KohonenConnector : public Connector
				{
				/// <summary>
				/// Creates a new Kohonen connector between the given layers.
				/// </summary>
				public: KohonenConnector(KohonenLayer *sourceLayer, KohonenLayer *targetLayer);

						/// <summary>
						/// Private helper to construct synapses between layers
						/// </summary>
				protected: void ConstructSynapses() override;

						   /// <summary>
						   /// Initializes all synapses in the connector and makes them ready to undergo training
						   /// freshly. (Adjusts the weights of synapses using the initializer)
						   /// </summary>
				public: void Initialize() override;
				};
			}

		}
	}